import java.util.*;

public class GradeExam {
    public static void main(String[] args) {
        char[][] answers = {
            {'A', 'B', 'C', 'C', 'D', 'C', 'A', 'C', 'D'},
            {'C', 'A', 'E', 'D', 'A', 'D', 'E', 'A', 'B'},
            {'C', 'D', 'E', 'C', 'B', 'A', 'E', 'A', 'D'},
            {'A', 'B', 'D', 'A', 'C', 'B', 'E', 'A', 'D'},
            {'C', 'B', 'A', 'D', 'E', 'C', 'E', 'A', 'D'},
            {'A', 'B', 'C', 'E', 'A', 'D', 'E', 'A', 'D'},
            {'A', 'B', 'B', 'B', 'D', 'A', 'E', 'A', 'D'},
            {'A', 'B', 'D', 'A', 'E', 'D', 'E', 'A', 'D'},
        };
        char[] keys = {'D', 'B', 'D', 'C', 'C', 'D', 'A', 'E', 'A'};
        
        for (int i = 0; i < answers.length; i++) {
            int correctCount = 0;
            for (int j = 0; j < answers[i].length; j++) {
                if (answers[i][j] == keys[j]) {
                    correctCount++;
                }
            }
            System.out.println("Studentu " + i + " skaits ir "
                    + correctCount);
        }
    }
}